package com.shk.dao;

import com.github.pagehelper.Page;
import com.shk.pojo.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface UserDao {

    User findByUserName(@Param("username") String username);

    List<Map<String, Object>> findMean(String username);


    /**
     * 查询年龄
     * @return
     */
    List<Map<String,Object>> finByAge();



    void setUserAndRole(Map map);

    void add(User user);

    Page<User> findPage(@Param("value") String queryString);

    void deleteUserAndRole(@Param("user_id") Integer userId);

    void delete(@Param("id") Integer id);

    void update(User user);

    User findById(@Param("userId") Integer userId);

    List<Integer> findRoleByUserId(@Param("userId") Integer userId);
}



